package com.cxd.service.impl;

import com.cxd.entity.EbProductCategory;
import com.cxd.mapper.EbProductCategoryMapper;
import com.cxd.service.IEbProductCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EbProductCategoryServiceImpl implements IEbProductCategoryService {
    @Autowired
    private EbProductCategoryMapper ebProductCategoryMapper;
    @Override
    public List<EbProductCategory> listByPage(){
        return ebProductCategoryMapper.listByPage();
    }
    @Override
    public EbProductCategory selectByCondition(Integer epcId){
        return ebProductCategoryMapper.selectByCondition(epcId);
    }

    @Override
    public EbProductCategory selectByName(String epcName) {
        return ebProductCategoryMapper.selectByName(epcName);
    }


    @Override
    public int updateById(EbProductCategory ebProductCategory){
        return ebProductCategoryMapper.updateById(ebProductCategory);
    }
    @Override
    public int delete(Integer epcId){
        return ebProductCategoryMapper.delete(epcId);

    }

    @Override
    public int deleteAllChild(Integer epcParentId) {
        return ebProductCategoryMapper.deleteAllChild(epcParentId);
    }

    @Override
    public int save(EbProductCategory ebProductCategory){
        return ebProductCategoryMapper.save(ebProductCategory);
    }

    @Override
    public Integer findTotalPage(Integer pageSize) {
        return ebProductCategoryMapper.getTotalPage(pageSize);
    }
}
